An optical sensor which detects the state, such as brightness and color, of light has been hitherto proposed (see PTL 1, for example). As shown in FIG. 5, this optical sensor includes a light-receiving element 4, and is installed in a device while a light-receiving part of the light-receiving element 4 is oriented in the direction of light to be detected. The light-receiving element 4 receives the light, so that the optical sensor is capable of detecting the brightness, color and the like of the light. Such an optical sensor is installed, for example, in a television set, and is capable of detecting the brightness of a room in which the television set is placed. The optical sensor is capable of properly adjusting the brightness of the screen of the television set in accordance with the detected brightness of the room.